/**
* @file   FileWriterTest.cpp
* @brief  Implementation file for class FileWriterTest
* @date   2011-04-12 19:09:23
* @author Yanze Lian
* @email  <yanzel@gmail.com>
*/

#include "stdafx.h"
#include "FileWriterTest.h"
#include <uuids.h>
#include "..\..\VideoEditor\VideoEditor\Classes\FileWriter.h"
#include "..\..\VideoEditor\VideoEditor\Classes\safe_defs.h"
#include "..\..\VideoEditor\VideoEditor\Classes\DxFuncs.h"


CPPUNIT_TEST_SUITE_REGISTRATION(FileWriterTest);

FileWriterTest::FileWriterTest()
{
}

FileWriterTest::~FileWriterTest()
{
}

void FileWriterTest::setUp()
{
	CoInitialize(NULL);
}

void FileWriterTest::tearDown()
{
	CoUninitialize();
}



void FileWriterTest::test()
{
	IGraphBuilder* pGraph = NULL;
	HRESULT hr = DxFuncs::CreateFilterGraph(&pGraph);
	CPPUNIT_ASSERT_EQUAL(S_OK, hr);
	FileWriter fileWriter;
	CPPUNIT_ASSERT_EQUAL(S_OK, fileWriter.Init(pGraph, _T("C:\\test.asf")));
	SAFE_RELEASE(pGraph);
}

